from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
action = ActionChains(driver)
url = r"https://www.selenium.dev/zh-cn/documentation/"
driver.get(url)
driver.implicitly_wait(2)

webdriver = driver.find_element(By.XPATH, "//*[@id='m-zh-cndocumentationwebdriver']/span")
action.move_to_element(webdriver).click().perform()
driver.implicitly_wait(2)

Actions = driver.find_element(By.XPATH, "//*[@id='m-zh-cndocumentationwebdriveractions_api']/span")
action.move_to_element(Actions).click().perform()

Mouse = driver.find_element(By.XPATH, "//*[@id='m-zh-cndocumentationwebdriveractions_apimouse']/span")
action.move_to_element(Mouse).click().perform()

a = driver.find_element(By.XPATH, "/html/body/div/div[1]/div/main/div/div[14]/a")
action.scroll_to_element(a).perform()

driver.find_element(By.XPATH, "//*[@id='tabs-11-01-tab']").click()
input("按任意键关闭")
driver.close()
driver.quit()
